package com.settlement.system.listener.easyexcel;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.settlement.system.model.vo.DyBillImportVo;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.util.StringUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * 抖音账单导入类
 */
@Slf4j
@Data
public class DyBillImportListener extends AnalysisEventListener<DyBillImportVo> {

    private List<DyBillImportVo> vos = new ArrayList<>();

    @Override
    public void invoke(DyBillImportVo billImportVo, AnalysisContext analysisContext) {
        if (StringUtils.hasText(billImportVo.getSettlementTime())) {
            vos.add(billImportVo);
        }
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {

    }
}
